GXStartPage
QuickDraw GX sends theGXStartPage
message to start a new page in the spool file. You can override theGXStartPage
message to perform any initialization your printing extension or printer driver requires before printing each page. Your override of theGXStartPage
message must match the following formal declaration:
OSErr MyStartPage (gxFormat aFormat, long numViewPorts, gxViewPort *viewPortList);
aFormat
- The format object for the page.
numViewPorts
- The number of view ports pointed to by the
viewPortList
parameter.viewPortList
- A pointer to a list of view ports to use to capture shapes.
- function result
- An error code. The value
noErr
indicates that the operation was successful.DESCRIPTION
QuickDraw GX sends this message when an application calls theGXStartPage
function to start a new page. The application calls theGXStartPage
andGXFinishPage
functions once for each page, which causes QuickDraw GX to send theGXStartPage
andGXFinishPage
messages. TheGXStartPage
message begins a new page in the spool file and prepares to capture all data drawn to the view ports in theviewPortList
parameter so that this data can be redirected to the new page.You need to override this message if you want to initialize information when an application begins printing each page. You can also override this message to determine when a new page is being spooled.
The default implementation of
GXStartPage
installs view port filters on the requested view ports to begin capturing graphics objects.SPECIAL CONSIDERATIONS
You never send theGXStartPage
message yourself.You must forward the
GXStartPage
message to other message handlers so that they can override it. If your override fails, you need to call theGXCleanupStartPage
function to notify other handlers of the failure. If another handler returns an error, you must undo anything that you've done and return the same error.RESULT CODES
gxSegmentLoadFailedErr A required code segment could not be found,
or there was not enough memory to load it.gxPrUserAbortErr The user has canceled printing. SEE ALSO
TheGXStartPage
andGxFinishPage
functions are described in Inside Macintosh: QuickDraw GX Printing.The
GXCleanupStartPage
function is described on page 5-37 in the chapter "Printing Functions for Message Overrides."
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help